Statechart design environments provide a design tool for modeling and simulating event driven systems and subsystems. Statecharts enable the graphical representation of hierarchical and parallel states and the event driven transitions between them. The statecharts include both logic and internal data and can be used to visually detect a current state during the operation of the system being modeled.
However, while traditional statechart environments enable the graphical modeling of the execution of many systems in an easy to understand format, certain systems do not lend themselves to be modeled in a statechart environment. More particularly, it is often difficult to model a system where a component is represented by multiple state machines each of which may move from one state to another based on temporal and numerical constraints. In these systems with multiple state machines, at any given point during the execution, every component is associated with a single state machine. External conditions then require the switching of the association for the component from one state machine to another. In a traditional statechart environment this type of modeling where the association of the component with the state machine needs to switch dynamically during execution may be attempted by representing the different state machines as separate charts contained in embedded subsystems. Global variables may be made available to the statechart execution environment in order to provide continuity in data to the various state machines. The switching of the association of the component with the state machines may then be accomplished by disabling and enabling the various subsystems containing the independent state machines. Unfortunately, the logic and overhead required in order to save configuration data for the multiple state machines in conventional statechart environments (some of which need to start in a particular restored configuration) is less than optimally efficient. The generation of code from such a system is also less than efficient. Accordingly, it would be desirable to have a mechanism that enabled rapid transitions from one state machine to another in a statechart environment.